//
//  LHTabBarController.m
//  Knight_Tour
//
//  Created by Bruce_Lin on 15/5/21.
//  Copyright (c) 2015年 TouchOne. All rights reserved.
//

#import "LHTabBarController.h"
#import "LHSuperViewController.h"
#import "LHUserViewController.h"
#import "LHHomePageViewController.h"
#import "LHRecommendHomePageViewController.h"
#import "LHMapViewController.h"
#import "LHSearchViewController.h"
#import "LHProvinceViewController.h"

@interface LHTabBarController ()

@end

@implementation LHTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBar.translucent = NO;
    self.navigationController.navigationBarHidden = YES;
    //用户
    LHUserViewController *lhUserVC = [[[LHUserViewController alloc] init]autorelease];
    UINavigationController *lhUserNVC = [[[UINavigationController alloc] initWithRootViewController:lhUserVC]autorelease];
    lhUserNVC.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@"我的" image:[UIImage imageNamed:@"0002"] tag:1000] autorelease];
    
    //全国游
    LHProvinceViewController *lhCountryHomePageVC = [[[LHProvinceViewController alloc]init]autorelease];
    UINavigationController *lhCountryHomePageNVC = [[[UINavigationController alloc]initWithRootViewController:lhCountryHomePageVC]autorelease];
    lhCountryHomePageNVC.tabBarItem = [[[UITabBarItem alloc]initWithTitle:@"全国景点" image:[UIImage imageNamed:@"0004"] tag:2000] autorelease];
    
    //推荐游
    LHRecommendHomePageViewController *lhRecommendHomePageVC = [[[LHRecommendHomePageViewController alloc]init]autorelease];
    UINavigationController *lhRecommendHomePageNVC = [[[UINavigationController alloc]initWithRootViewController:lhRecommendHomePageVC]autorelease];
    lhRecommendHomePageNVC.tabBarItem = [[[UITabBarItem alloc]initWithTitle:@"推荐游" image:[UIImage imageNamed:@"0001"] tag:3000]autorelease];
    
    //地图
    LHSearchViewController *lhMapVC = [[[LHSearchViewController alloc]init]autorelease];
    UINavigationController *lhMapNVC = [[[UINavigationController alloc]initWithRootViewController:lhMapVC]autorelease];
    lhMapNVC.tabBarItem = [[[UITabBarItem alloc]initWithTitle:@"地图" image:[UIImage imageNamed:@"0003"] tag:4000]autorelease];

    self.viewControllers = @[lhRecommendHomePageNVC,lhCountryHomePageNVC, lhMapNVC, lhUserNVC];
    self.tabBar.translucent = NO;

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
